import request from '@/utils/request'
import {
  faceApiUrl
} from '../config'

/**
 * 技术交底列表
 * @param parameter
 */
export function getPageTechnicalDisclosure(parameter) {
  return request({
    url: faceApiUrl + '/technicalDisclosure/getPageTechnicalDisclosure',
    method: 'post',
    data: parameter
  })
}
/**
 * 技术交底删除
 * @param parameter
 */
export function delTechnicalDisclosure(parameter) {
  return request({
    url: faceApiUrl + '/technicalDisclosure/deleteByPrimaryKey/' + parameter.id,
    method: 'get',
  })
}

/**
 * 技术交底新增
 * @param parameter
 */
export function addTechnicalDisclosure(parameter) {
  return request({
    url: faceApiUrl + '/technicalDisclosure/insertSelective',
    method: 'post',
    data: parameter
  })
}
/**
 * 技术交底修改
 * @param parameter
 */
export function updateTechnicalDisclosure(parameter) {
  return request({
    url: faceApiUrl + '/technicalDisclosure/updateByPrimaryKeySelective',
    method: 'post',
    data: parameter
  })
}
/**
 * 技术交底详情
 * @param parameter
 */
export function getTechnicalDisclosureById(parameter) {
  return request({
    url: faceApiUrl + '/technicalDisclosure/getTechnicalDisclosureById',
    method: 'get',
    params: parameter
  })
}

/**
 * 技术交底导出
 * @param data
 */
export function downExcel(data, filename) {
  return downloadPost(SCIENCE + '/technology/template/exportExcel', data, {}, filename)
}

/**
 * 计数交底列表统计
 * @param parameter
 */
export function technicalDisclosureGetTotal(parameter) {
  return request({
    url: faceApiUrl + '/technicalDisclosure/getTotal',
    method: 'post',
    data: parameter
  })
}

/**
 * 技术交底记录
 * @param parameter
 */
export function queryTechnicalDisclosureList(parameter) {
  return request({
    url: faceApiUrl + '/technicalDisclosure/queryTechnicalDisclosureList',
    method: 'post',
    data: parameter
  })
}